#include "mainwindow.h"
#include <QApplication>
#include <QDialog>
#include "login_dialog.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    LoginDialog loginDialog;
    if (loginDialog.exec() == QDialog::Accepted) {
        MainWindow w;
        w.setUserRole(static_cast<MainWindow::UserRole>(loginDialog.getSelectedRole()));
        w.setUserAccount(loginDialog.getUserName());
        w.show();
        return a.exec();
    }
    return 0;
}
